package com.bt7274.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 邀请码表 ：用于记录用户生成的邀请码
 * </p>
 *
 * @author hp
 * @since 2025-03-25
 */
@TableName("invitation_code")
public class InvitationCode implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /**
     * 邀请码
     */
    private String code;

    /**
     * 创建者id
     */
    private String createBy;

    /**
     * 使用者id，可以用于判断是否邀请码被使用
     */
    private String usedBy;

    /**
     * 过期时间
     */
    private LocalDateTime expiresTime;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUsedBy() {
        return usedBy;
    }

    public void setUsedBy(String usedBy) {
        this.usedBy = usedBy;
    }

    public LocalDateTime getExpiresTime() {
        return expiresTime;
    }

    public void setExpiresTime(LocalDateTime expiresTime) {
        this.expiresTime = expiresTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "InvitationCode{" +
        "id = " + id +
        ", code = " + code +
        ", createBy = " + createBy +
        ", usedBy = " + usedBy +
        ", expiresTime = " + expiresTime +
        ", createTime = " + createTime +
        "}";
    }
}
